// part1:C10:ex10.1.cpp
// read sequence of int type, store them to vector.
// print elements of vector.
#include <iostream>
#include <fstream>
#include <vector>
#include <algorithm>
using namespace std;

int main(int argc, char *argv[]) {
  ifstream in(argv[1]);
  if (!in) {
    cout << "failed to open input file!" << endl;
    exit(1);
  }

  vector<int> v;
  int val;
  while (in >> val) {
    v.push_back(val);
  }
  cout << "Enter your find integer:\n";
  cin >> val;

  cout << "sequence include : " << count(v.begin(), v.end(), val)
    << " " << val; 
    
  return 0;
}
